<template>
	<view class="container">
		<view class="box">
			<view class="box-one" @tap="goWorks(item)" v-for="(item,index) in workCard" :key="index">
				<view class="box-image">
					<image class="images" :src="item.imgUrl" alt=""></image>
				</view>
				<view class="box-txt">
					{{item.name}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import{workCard} from '@/utils/address.js'
	export default {
		data() {
			return {
				workCard:workCard
			}
		},
		methods: {
			goWorks(item) {
					uni.navigateTo({
						url: `../HotWork/HotWork?id=${item.id}&name=${item.name}`
					})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #f6f6f6;
	}

	.container {
		padding: 24rpx;
		background-color: #f6f6f6;

		.box {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.box-one {
				width: 343rpx;
				height: 240rpx;
				background-color: #fff;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				margin-bottom: 16rpx;

				.box-image {
					width: 100rpx;
					height: 100rpx;
					background-color: #F6F6F6;
					border-radius: 36rpx;
					display: flex;
					justify-content: center;
					align-items: center;

					.images {
						width: 48rpx;
						height: 48rpx;
					}
				}

				.box-txt {
					color: #666666;
					font-size: 24rpx;
					line-height: 44rpx;

				}
			}
		}
	}
</style>
